{% extends 'base_with_listing.html' %}

{% block title %}All rentals{% endblock %}

{% block header %} {% if reader %} {{ reader.first_name }} {{ reader.last_name }} {% else %}Rental archive{% endif %} {% endblock %}

{% block order %} [[1,0]] {% endblock %}
{% block itemsWrapper %}rsv_archive itemsWrapper{% endblock %}

    {% block header_row %}
        <th> ID      </th>
        <th> Title   </th>
        <th>Authors  </th>
        <th>Rented   </th>
        <th>Returned </th>
    {% endblock %}

    {% block item_row %}
        <td>
            {{ row.id  }}
        </td><td>
            {{ row.title }}
        </td><td>
            {% if row.authors %}{{ row.authors|join:', '}}{% endif %}
        </td><td>
            {{ row.rented }}
        </td><td>
            {% if row.returned %} {{ row.returned }} {% else %} --- {% endif %}
        </td>
    {% endblock %}
